import { $t } from "#/locales"
import type { TemplateAttribute } from "./types"

export const templateAttribute: TemplateAttribute[] = [
  {
    fieldName: 'nameCn',
    name: $t('certificateTemplate.nameCnTxt'),
    x: 540,
    y: 400,
    alignCenter: true,
    fontColor: '#000000',
    fontBold: false,
    fontItalic: false,
    fontType: 'SYHEITICN_LIGHT',
    fontSize: 22,
    isActive: false,
    exampleValue: $t('certificateTemplate.exampleNameCnTxt')
  }, {
    fieldName: 'nameEn',
    name: $t('certificateTemplate.nameEnTxt'),
    x: 540,
    y: 355,
    alignCenter: true,
    fontColor: '#000000',
    fontBold: false,
    fontItalic: false,
    fontType: 'SYHEITICN_LIGHT',
    fontSize: 22,
    isActive: false,
    exampleValue: 'Zhang San'
  }, {
    fieldName: 'certificateNumber',
    name: $t('certificateTemplate.certificateNumberTxt'),
    x: 265,
    y: 305,
    alignCenter: false,
    fontColor: '#000000',
    fontBold: false,
    fontItalic: false,
    fontType: 'SYHEITICN_LIGHT',
    fontSize: 18,
    isActive: false,
    exampleValue: 'CERT-2025-001'
  }, {
    fieldName: 'meansTime',
    name: $t('certificateTemplate.meansTimeTxt'),
    x: 160,
    y: 212,
    alignCenter: false,
    fontColor: '#000000',
    fontBold: false,
    fontItalic: false,
    fontType: 'SYHEITICN_LIGHT',
    fontSize: 14,
    isActive: false,
    exampleValue: `${$t('certificateTemplate.exampleMeansTimeTxt')}`
  }, {
    fieldName: 'validTime',
    name: $t('certificateTemplate.validTimeTxt'),
    x: 160,
    y: 192,
    alignCenter: false,
    fontColor: '#000000',
    fontBold: false,
    fontItalic: false,
    fontType: 'SYHEITICN_LIGHT',
    fontSize: 14,
    isActive: false,
    exampleValue: `${$t('certificateTemplate.exampleValidTimeTxt')}`
  }
]

export const examplePreviewInfo = {
  previewInfo: "{\"certificateNumber\":\"CERT-2025-001\",\"userId\":\"USER-001\",\"examInfoId\":\"EXAM-INFO-001\",\"examScoreId\":\"EXAM-SCORE-001\",\"nameCn\":\"张三\",\"nameEn\":\"Zhang San\",\"meansTime\":\"2025年04月05日\",\"validTime\":\"2027年04月05日\",\"insertUser\":\"ADMIN-001\",\"publishStatus\":\"UNPUBLISHED\"}",
  templateFile: "certificate/t1.png",
  tempTextConfigs: [
      {
          "fieldName": "nameCn",
          "x": 100,
          "y": 50,
          "alignCenter": true,
          "fontColor": "#000000",
          "fontBold": true,
          "fontItalic": false,
          "fontType": "SYHEITICN_LIGHT",
          "fontSize": 12
      },
      {
          "fieldName": "certificateNumber",
          "x": 150,
          "y": 100,
          "alignCenter": false,
          "fontColor": "#FF0000",
          "fontBold": false,
          "fontItalic": true,
          "fontType": "SYHEITICN_LIGHT",
          "fontSize": 14
      },
      {
          "fieldName": "nameEn",
          "x": 200,
          "y": 300,
          "alignCenter": false,
          "fontColor": "#FF0000",
          "fontBold": false,
          "fontItalic": true,
          "fontType": "SYHEITICN_LIGHT",
          "fontSize": 14
      }
  ]
}
